package day10;

import java.io.*;

public class ioPrc01 {
    public static void main(String[] args) {
//        method1();
//        method2();
//        method3();
        method4();
    }

    private static void method3() {
        Reader in;
        try {
            in=new FileReader("G:\\ready\\3.txt");
            int b;
            while ((b=in.read())!=-1){
                System.out.println(b);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private static void method4() {
        BufferedReader in=null;
        try {
            in =new BufferedReader(new FileReader("G:\\ready\\3.txt"));
            int b;
            while ((b=in.read())!=-1){
               System.out.println(b);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private static void method1() {
        FileInputStream in=null;
        try {
            in=new FileInputStream("G:\\ready\\3.txt");
            int b;
            while ((b=in.read())!=-1){
                System.out.println(b);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private static void method2() {
        BufferedInputStream in=null;
        try {
            in=new BufferedInputStream(new FileInputStream("G:\\ready\\3.txt"));
            int b;
            while ((b=in.read())!=-1){
                System.out.println(b);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    /***/
}
